<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>贪吃蛇游戏</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="game-container">
        <canvas id="game-canvas" width="400" height="400"></canvas>
        
        <div id="score-display">得分: 0</div>
        
        <div id="start-screen" class="game-overlay">
            <h1 class="game-title">贪吃蛇</h1>
            
            <div class="difficulty-options">
                <div class="difficulty-option selected" data-speed="150">简单</div>
                <div class="difficulty-option" data-speed="100">中等</div>
                <div class="difficulty-option" data-speed="50">困难</div>
            </div>
            
            <button id="start-btn" class="game-button">开始游戏</button>
        </div>
        
        <div id="game-over" class="game-overlay">
            <h1 class="game-title">游戏结束</h1>
            <p id="final-score">得分: 0</p>
            <button id="restart-btn" class="game-button">再玩一次</button>
        </div>
    </div>
    
    <div class="instructions">
        <p><span class="snake-icon">🐍</span> 使用方向键 ↑ ↓ ← → 控制蛇的移动</p>
        <p><span class="snake-icon food-icon">🍎</span> 吃到食物增长身体，不要撞到墙壁或自己!</p>
    </div>

    <script src="js/snake.js"></script>
    <script src="js/food.js"></script>
    <script src="js/game.js"></script>
    <script src="js/ui.js"></script>
</body>
</html>